package com.app.manage.moudles.app.dao;

import com.app.manage.moudles.app.po.AppServerPo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.app.manage.moudles.app.entity.TAppServer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * (TAppServer)表数据库访问层
 *
 * @author makejava
 * @since 2025-05-16 11:19:24
 */
@Mapper
public interface TAppServerDao extends BaseMapper<TAppServer> {

    /**
     * 查询应用的服务器id
     * @param appId
     * @return
     */
    List<Integer> findServerIdforApp(Integer appId);

    /**
     * 查询服务下所有的应用Id
     * @param serverId
     * @return
     */
    List<Integer> findAppIdForServer(Integer serverId);

    /**
     * 统计某一个服务下的应用个数
     * @param idList
     * @param <T>
     * @return
     */
    <T>Integer   countAppForServer(List<T> idList);

    /**
     * 查询应用的所属服务区Ip
     * @param appId
     * @return
     */
    List<String>  selectServerIpsByAppId(Integer appId);

    /**
     * 查询综合Po
     * @param appIdList
     * @return
     */
    List<AppServerPo> listAppPo(List<Integer> appIdList);


    List<AppServerPo> listAppPoById(List<Integer> idList);



}

